﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyKhachSan
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
            this.notifyIcon1.Icon = Properties.Resources.home;

        }
        UserControls.Home ucHome;
        UserControls.LapPhieuThuePhong ucLapPhieuThue;
        UserControls.LapHoaDonThanhToan ucLapHoaDonThanhToan;
        UserControls.LapDanhMucPhong ucLapDanhMucPhong;
        UserControls.TraCuu ucTraCuu;
        UserControls.BaoCaoDoanhThu ucBaoCaoDoanhThu;
        UserControls.BaoCaoMatDo ucBaoCaoMatDo;
        UserControls.ThayDoiQuiDinh ucThayDoiQuiDinh;
        UserControls.PhanQuyen ucPhanQuyen;


        private void FrmMain_Load(object sender, EventArgs e)
        {
            ucHome = new UserControls.Home();
            panelEx2.Controls.Add(ucHome);
            //grbPhong.Enabled = false;
            //grbThongKe.Enabled = false;
            //grbHeThong.Enabled = false;
        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            ucLapPhieuThue = new UserControls.LapPhieuThuePhong();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucLapPhieuThue);
        }

        private void btnLapHoaDon_Click(object sender, EventArgs e)
        {
            ucLapHoaDonThanhToan = new UserControls.LapHoaDonThanhToan();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucLapHoaDonThanhToan);
        }

        private void btnLapDanhMuc_Click(object sender, EventArgs e)
        {
            ucLapDanhMucPhong = new UserControls.LapDanhMucPhong();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucLapDanhMucPhong);
        }

        private void btnTraCuu_Click(object sender, EventArgs e)
        {
            ucTraCuu = new UserControls.TraCuu();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucTraCuu);
        }

        private void btnThongKe_Click(object sender, EventArgs e)
        {
            ucBaoCaoDoanhThu = new UserControls.BaoCaoDoanhThu();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucBaoCaoDoanhThu);
        }

        private void btnThayDoiQuiDinh_Click(object sender, EventArgs e)
        {
            ucThayDoiQuiDinh = new UserControls.ThayDoiQuiDinh();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucThayDoiQuiDinh);
        }

        private void btnPhanQuyen_Click(object sender, EventArgs e)
        {
            ucPhanQuyen = new UserControls.PhanQuyen();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucPhanQuyen);
        }

        private void btnBaoCaoMatDo_Click(object sender, EventArgs e)
        {
            ucBaoCaoMatDo = new UserControls.BaoCaoMatDo();
            panelEx2.Controls.Clear();
            panelEx2.Controls.Add(ucBaoCaoMatDo);
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}
